<%@page import="itsm.isperp.framework.core.context.ContextHolder"%><%@page
	import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div style="display: none">
	<input type="hidden" name="processId" value="${model.processId }"><input
		type="hidden" id="nextTaskId" name="nextTaskId" value=""><input
		type="hidden" id="nextTransitionId" name="nextTransitionId" value="">

	<input type="hidden" id="nextTransitionName" name="nextTransitionName"
		value="">

</div>
<div id="processBtn" style="text-align: center;">
	<c:forEach items="${trans}" var="item">
		<button type="button" class="processButton"
			onclick="return submitForm(this);"
			data-next_task_id="${item.nextTaskId}"
			data-next_transition_id="${item.nextTransitionId}"
			data-name="${item.name}" data-commit_type="${item.commitType}"
			data-process_mode="${item.processMode}">${item.name }</button>

	</c:forEach>
</div>
<span id="processSubmiting"
	style="display:none;color:red;font-size:14px">正在提交，请稍候......</span>


<script type="text/javascript">
<!--
	function submitForm(obj) {
		var $obj = $(obj);
		var suggestion = $("#suggestion").val();

		if (suggestion == null || suggestion == "") {
			alert("请填写审批意见！");
			return false;
		}
		$("#nextTaskId").val($obj.data("next_task_id"));
		$("#nextTransitionId").val($obj.data("next_transition_id"));
		$("#nextTransitionName").val($obj.data("name"));

		if (submitStart()) {
			$("#processBtn").hide();
			$("#processSubmiting").show();
		}

	}
//-->
</script>
